package main

import (
	"smyx.com/gwt/config"
	"smyx.com/gwt/global"
	"smyx.com/gwt/router"
)

func main() {
	config.InitBasicConfig()
	global.GApp.Log = config.InitializeLog()
	global.GApp.DB = config.InitializeDB()
	defer func() {
		if global.GApp.DB != nil {
			db, _ := global.GApp.DB.DB()
			_ = db.Close()
		}
	}()
	router.RunServer()
}
